1. Field of the Invention
The invention relates generally to image processing. More specifically, the invention relates to correcting the color response of imaging devices.
2. Description of the Related Art
As the spectral sensitivities (reaction to light stimulus) of most color devices are typically different from that of human vision, signals from different color channels (such as Red, Green and Blue) of a device need to be mixed together in some proportion to generate color information suitable for display.
In order to share the correct color information in an open systems environment, the color response characteristics of the devices need to be known accurately. In device-independent color management approach, the goal is efficiently achieved by specifying the relation between the color space of each device and a common standard color space, such as the renowned 1931 CIE XYZ (2xc2x0 observer) color space or 1976 CIE La*b* color space. Linear/nonlinear transformation or look-up-table (LUT) approach is usually used to specify such relation. The transformations or corresponding look-up tables are normally established by minimizing some error measure between the target and the transformed color coordinates over a large set of color patches. To be specific, let r be the Nxc3x971 vector consisting of equispaced samples of spectral reflectance or spectral transmittance of a color patch, Ls the Nxc3x97N diagonal matrix whose diagonal entries are the equispaced samples of spectral power distribution of the scene illuminant, and H the Nxc3x973 matrix whose columns are the sampled CIE XYZ color matching functions. The CIE XYZ tristimulus values q (3xc3x971 vector) under scene illuminant Ls can be computed as:
q=HTLsrxe2x80x83xe2x80x83(1)
Suppose that the overall spectral responsivity of the color device of interest can be represented by an Nxc3x97K matrix D, where K is the total number of the device color channels and the ith column of matrix D is the sampled spectral responsivity of the ith device color channel. Under the device illuminant Ld, the device measurements, denoted as a Kxc3x971 vector p, of the color patch r can be written as:
p=DTLdrxe2x80x83xe2x80x83(2)
To specify the relation between the device and the CIE XYZ color spaces, a transformation T (or look-up table) is used to convert each device measurement into its corresponding CIE XYZ tristimulus values, i.e.,
q=T(p)xe2x80x83xe2x80x83(3)
As the spectral sensitivities of most color devices are not within a linear transformation from the CIE XYZ color matching function, a linear matrix type of transformation can only specifies the relationship between all p and q pairs in an approximate manner. Let M be such a 3xc3x97K matrix which transforms as accurately as possible each device measurement p into its corresponding CIE XYZ tristimulus values q. Typically, the color correction matrix M is obtained by minimizing the mean squares errors between the target CIE XYZ tristimulus values q and their prediction {circumflex over (q)}=Mp over a rich set of color patches, i.e.,                               e          c                =                              ∑            p                    ⁢                      xe2x80x83                    ⁢                                    "LeftDoubleBracketingBar"                              q                -                Mp                            "RightDoubleBracketingBar"                        2                                              (4)            
Let P be a Kxc3x97V matrix whose columns are the device measurements from a set of V color patches and Q be a 3xc3x97V matrix whose columns are the corresponding CIE XYZ tristimulus values. Equation (4) is equivalent to
xcex5C=tr ([Qxe2x88x92MP]{overscore ( )}[Qxe2x88x92MP])xe2x80x83xe2x80x83(4a)
where tr(xc2x7) is the matrix trace operator which is defined to be the sum of the diagonal elements of its matrix operand. By using least-squares technique, the color correction matrix MLS that minimizes the error xcex5C can be computed as
MLS=QPT[PPt]xe2x88x921xe2x80x83xe2x80x83(5)
As the reproduced color error is the only concern in the minimization process, it does not take into account the effects of noise amplification after mixing the device measurements with the color correction matrix MLS. To see this, let xcexa3d be the noise covariance matrix of the device measurement. From the results of error propagation in linear systems, it can be shown that, by using a 3xc3x97K matrix M to transform the device measurement into the CIE XYZ color space, the noise covariance matrix in CIE XYZ space, denoted as xcexa3x, becomes
xcexa3x=Mxcexa3dMTxe2x80x83xe2x80x83(6)
Furthermore, the CIE XYZ color space is normally used as an intermediate color connection space. To display the color of the device measurements in a particular output device, the CIE XYZ tristimulus values need to be converted to the color coordinates of the output device. For instance, to display on a CRT display, the CIE XYZ tristimulus values are usually converted to the RGB standard color space.
As the noise covariance matrices xcexa3x and xcexa30 are functions of M, the color correction matrix used to convert the device measurements to the color coordinates of the target device would have impacts on the noise levels of the output colors.
In particular, the diagonal elements of matrices xcexa3x and xcexa30 are noise variances of color channels in the respective color spaces. The larger the diagonal elements of matrices xcexa3x or xcexa30, the noisier (or more graininess) the color reproduced in the relative color channels of the target device. Although reproducing the measured color with good accuracy is an important goal, it shouldn""t be done it a way that would over amplify the noise (or graininess) levels in the reproduced color. Today""s electronic image sensors(such as CCD or CMOS) are subject to all manner of different noise such as quantum exposure noise, dark current noise, thermal noise, readout noise and so on, which will adversely impact image quality when color reproduction is high. Most of the color experience encountered in real life or imaging applications is relative sensation. There are occasions where accurate color reproductions are difficult or infeasible and, as a result, the noise level in the reproduced color becomes an important concern. For examples, color reproduction in low light or unknown illuminant environment. In the later case, auto white balance is usually required to reproduce the color, and it is hard to achieve great color accuracy if the illuminant color is not known a priori.
What is disclosed is a method for determining an optimal color correction matrix accounting for both total noise variance and color reproduction error for a captured image, and correcting the colors of the captured image using the optimal color correction matrix.